package com.mangohouse.dao.core.impl;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.mangohouse.dao.core.ISysMenuDao;
import com.mangohouse.model.core.SysMenu;
import com.mangohouse.model.core.SysUser;

/**
 * 
 * @TODO  系统菜单DAO实现类
 * @author roye
 * @date May 3, 2013 10:14:04 AM
 * @version V1.0
 */
@Repository
public class CSysMenuDaoImpl  implements ISysMenuDao{
	
	
	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;

	/**
	 * 获取用户权限
	 */
	@SuppressWarnings("unchecked")
	public List<SysMenu> getPrivilegeMenuByUser(SysUser user)
			throws DataAccessException {
		return sqlSessionTemplate.selectList("SysMenu.getPrivilegeMenuByUser",user);
	}
}
